#include<stdio.h>
#include<conio.h>
#include<math.h>
int sapxeptang(int a[],int n){
	int temp;
     for (int i=0; i<n-1;i++)
     	for(int j=i+1;j<n;j++)
     	    if(a[i]>a[j]){
     	          temp = a[i];
     	          a[i] = a[j];
     	          a[j] = temp;
		                 }
	printf("\nMang sap xep tang dan la: "); 
         for(int i=0;i<n;i++) 
         printf("\t%d",a[i]); 
     }
int main(){
	int a[] = {1,6,4,8,3};
	int n = sizeof(a);
	for(int i=0;i<n;i++)
	    printf("\t%d ",a[i]);
	sapxeptang(a,n);
	getch();
	
}
